<template>
  <div>
    <el-dialog v-bind="$attrs" title="预览文章" v-on="$listeners" @open="onOpen" @close="close">
      <el-row><h2>{{previewp.title}}</h2></el-row>
      <el-row >
        <span style="margin-left: 10px">{{previewp.createTime}}</span>
        <span style="margin-left: 10px">{{previewp.username
}}</span>
        <span style="margin-left: 10px">{{previewp.visits
}}</span></el-row>
      <el-row class="attrs" v-html="previewp.articleBody?previewp.articleBody:''"></el-row>
    </el-dialog>
  </div>
</template>
<script>
export default {
  data () {
    return {
      form: { 
      },
      
    }
  },
  props: {
    showDialogPreview: {
      type: Boolean,
      require: true
    },
    previewp: {
      type:Object,
      default: () => ({})
    }
    
  },

  methods: {
    onOpen() {},
    close() {
      this.$emit('update:showDialogPreview', false)
    },
 
  }
}

</script>
<style>
.attrs{
  background-color: #f4f4f5;
  color: #909399;font-size: 13px;
  margin-top: 10px;
  padding-left: 10px;
}
</style>
